Skip to content

release: 0.150.0 - #221

Merged
hiroTamada merged 10 commits into
mainfrom
release-please--branches--main--changes--next
Nov 19, 2026
Merged

hiroTamada merged 10 commits into
mainfrom
release-please--branches--main--changes--next

Conversation

@kernel-internal

@kernel-internal kernel-internal Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Automated Release PR

0.150.0 (2026-11-19)

Features

  • add workload identity federation credentials (#15) (885ec8f)
  • Accept browser_id when authorizing a Kernel card: Evervault alias cards route that browser through the card vault's proxy as soon as the cardholder enters a fresh CVC (9d1fc90)
  • Add captcha_solver to browser creation; stealth is deprecated in favor of captcha_solver and proxy (9d1fc90)
  • Add BrowserFingerprint records to browsers, applied at claim time (9d1fc90)
  • Add line_items to AgentCard card specs, passed through to checkout authorizations (9d1fc90)
  • Add workload identity, the effective policy and the service account principal to the auth context (9d1fc90)
  • Add the source_ip condition to API key policies (9d1fc90)
  • Replace an API key's permissions in place with PATCH /org/api_keys/{id}, and link API keys to service accounts (9d1fc90)
  • Document conditions in the API key reference descriptions (760bf19)
  • Route VGS reveal-session payment windows through their own session in egress (cbed38d)

This pull request is managed by Stainless's GitHub App.

The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.

For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.

🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions


Note

High Risk
Adds authentication and token-exchange logic on every API call; misconfiguration or cache/retry bugs could break all requests, and API key policy changes affect authorization behavior.

Overview
0.150.0 ships a full workload identity federation path for the Python client: Kernel / AsyncKernel can authenticate via credentials= (or env such as KERNEL_FEDERATION_RULE_ID) instead of a static API key, with token exchange, caching, refresh, and a single 401 retry. Public exports include WorkloadIdentityCredentials, built-in identity sources (GitHub Actions, GCP metadata, AWS STS via optional kernel[aws]), and exchange_federation_assertion.

Browser and pool APIs gain explicit captcha_solver (and related types/docs); stealth is deprecated and described as overlapping with captcha_solver + proxy. Fingerprints now support linux as well as macos and tie to captcha solving instead of stealth alone.

Org API keys in the SDK mirror server changes: create keys linked to service_account_id, PATCH can replace policy in place (including source_ip conditions), and models expose principal / policy conditions. Auth context types add workload identity fields and effective policy for service accounts.

Reviewed by Cursor Bugbot for commit 954cb49. Bugbot is set up for automated code reviews on this repo. Configure here.

sjmiller609 and others added 3 commits November 16, 2026 16:39
Stainless-Generated-From: a2db73ec83aa64b0c3862b95f791acc0d9105bf2
Stainless-Generated-From: eef5607d14d320431f3356f9a78894d30757f4a0
* feat: add workload identity federation credentials

Kernel and AsyncKernel accept credentials= and can resolve workload
identity federation from the environment. The client exchanges the
workload's own identity token for a short-lived access token, caches it,
refreshes it before expiry and retries a 401 once with a new exchange.

Adds built-in identity token sources for GitHub Actions, the Google
Cloud metadata server, AWS STS (optional boto3 extra), a token file and
a single-use static token, plus a one-shot exchange function.

* Make the replay hint depend on the identity token source

A token file that was not rotated is not a static token, so the hint now
names the file and says to rotate it, and callbacks and the one-shot
exchange get their own wording. invalid_target errors say how to set
resource.

* Log only the type of a provider's exception on background refresh failure

A caller's credentials provider can raise an exception whose text quotes a
token. The background-refresh warning now prints the message only for the
SDK's own WorkloadIdentityError, and the exception type for anything else.

---------

Co-authored-by: rgarcia <72655+rgarcia@users.noreply.github.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

if not direct_vm_request_body_is_replayable(response.request):
return False
_unauthorized_retry_used.set(True)
return True

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rejected token survives zero retries

High Severity

A 401 drops the cached access token only when _should_retry runs, and the base client skips that call whenever remaining_retries is 0. vault.perform_operation copies the client with max_retries=0, so a rejected federation token stays cached and every later call keeps sending it until it expires on its own.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 07c1a18. Configure here.

except RuntimeError:
# Threads cannot be started while the interpreter shuts down. The
# cached token is still valid, so skip this refresh.
self._land(flight, None, None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Background refresh races httpx client

Medium Severity

Advisory token refresh starts a daemon thread that POSTs through the same httpx.Client the caller immediately uses for the API request. httpx.Client is not thread-safe, so during the last ~2 minutes of each access-token lifetime those two sends can corrupt the pool or mix up responses.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 07c1a18. Configure here.

@kernel-internal
kernel-internal Bot force-pushed the release-please--branches--main--changes--next branch from 07c1a18 to 547085d Compare November 19, 2026 16:36
Stainless-Generated-From: 9a34d670fa00a07ff3c5ab572aabe77b31db4fe0
@kernel-internal
kernel-internal Bot force-pushed the release-please--branches--main--changes--next branch from 547085d to 136fdc0 Compare November 19, 2026 16:59

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread src/kernel/_client.py
return True
return super()._should_retry(response)

request = with_unauthorized_retry_scope(SyncAPIClient.request)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

401s skip workload token invalidation

Medium Severity

Rejected workload-identity access tokens are dropped only inside _should_retry, which the base client calls when retries remain. With max_retries=0 (including vault.perform_operation) or on a terminal 401, TokenCache.reject never runs, so the next call reuses the same rejected bearer token until a time-based refresh.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 136fdc0. Configure here.

Stainless-Generated-From: a199339b9b3f743c7924828ce6577dc933a3a627
@kernel-internal
kernel-internal Bot force-pushed the release-please--branches--main--changes--next branch from 136fdc0 to 1f0e586 Compare November 19, 2026 17:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 4 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1f0e586. Configure here.

return _Step(entry.token, self._new_flight_locked(new_event(), advisory=True))
if self._flight is not None:
return _Step(None, self._flight)
return _Step(None, self._new_flight_locked(new_event(), advisory=False), lead=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory refresh failure fails live requests

Medium Severity

When a cached token enters the mandatory refresh window while an advisory refresh is still in flight, waiters share that advisory call. If the background refresh fails, _raise_shared_failure raises to those waiters even though advisory failures are meant to be non-fatal and the previous token may still be valid. Concurrent get_token / async_get_token callers can then fail authentication instead of starting a mandatory refresh or using the cached token.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1f0e586. Configure here.

…ion in egress

Stainless-Generated-From: 145e06596826febc68ec45e6e9a467b2c17e6e00
@kernel-internal
kernel-internal Bot force-pushed the release-please--branches--main--changes--next branch from 1f0e586 to 3ef4148 Compare November 19, 2026 17:48
hiroTamada
hiroTamada previously approved these changes Nov 19, 2026
@hiroTamada
hiroTamada merged commit ddc8c1b into main Nov 19, 2026
11 checks passed
@kernel-internal

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants